package com.sunlee.common.service.dto;

import com.sunlee.common.core.validator.group.AddGroup;
import com.sunlee.common.core.validator.group.DefaultGroup;
import com.sunlee.common.core.validator.group.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;

/**
 * 第三方商品分类映射
 *
 * @author sunlee
 * @date 2023-03-04
 */
@Data
@ApiModel(value = "第三方商品分类映射表")
public class ThirdProductCategoryMappingDTO implements Serializable {

    @ApiModelProperty(value = "主键")
    @Null(message = "ID必须为空", groups = AddGroup.class)
    @NotNull(message = "ID不能为空", groups = UpdateGroup.class)
    private Long id;

    @ApiModelProperty(value = "第三方商品ID")
    @NotNull(message = "第三方商品ID不能为空", groups = DefaultGroup.class)
    private Long productId;

    @ApiModelProperty(value = "第三方分类ID")
    @NotNull(message = "第三方分类ID不能为空", groups = DefaultGroup.class)
    private Long categoryId;

    @ApiModelProperty(value = "来源")
    @NotNull(groups = DefaultGroup.class)
    private Integer source;
}